3.12.16 \(\int \frac {A+B x}{a+b x} \, dx\) [1116]

Optimal. Leaf size=25 \[ \frac {B x}{b}+\frac {(A b-a B) \log (a+b x)}{b^2} \]

[Out]

B*x/b+(A*b-B*a)*ln(b*x+a)/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {45} \begin {gather*} \frac {(A b-a B) \log (a+b x)}{b^2}+\frac {B x}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(a + b*x),x]

[Out]

(B*x)/b + ((A*b - a*B)*Log[a + b*x])/b^2

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {A+B x}{a+b x} \, dx &=\int \left (\frac {B}{b}+\frac {A b-a B}{b (a+b x)}\right ) \, dx\\ &=\frac {B x}{b}+\frac {(A b-a B) \log (a+b x)}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 25, normalized size = 1.00 \begin {gather*} \frac {B x}{b}+\frac {(A b-a B) \log (a+b x)}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(a + b*x),x]

[Out]

(B*x)/b + ((A*b - a*B)*Log[a + b*x])/b^2

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 26, normalized size = 1.04

method result size
default \(\frac {B x}{b}+\frac {\left (A b -B a \right ) \ln \left (b x +a \right )}{b^{2}}\) \(26\)
norman \(\frac {B x}{b}+\frac {\left (A b -B a \right ) \ln \left (b x +a \right )}{b^{2}}\) \(26\)
risch \(\frac {B x}{b}+\frac {\ln \left (b x +a \right ) A}{b}-\frac {\ln \left (b x +a \right ) B a}{b^{2}}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

B*x/b+(A*b-B*a)*ln(b*x+a)/b^2

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 26, normalized size = 1.04 \begin {gather*} \frac {B x}{b} - \frac {{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a),x, algorithm="maxima")

[Out]

B*x/b - (B*a - A*b)*log(b*x + a)/b^2

________________________________________________________________________________________

Fricas [A]
time = 0.84, size = 25, normalized size = 1.00 \begin {gather*} \frac {B b x - {\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a),x, algorithm="fricas")

[Out]

(B*b*x - (B*a - A*b)*log(b*x + a))/b^2

________________________________________________________________________________________

Sympy [A]
time = 0.09, size = 20, normalized size = 0.80 \begin {gather*} \frac {B x}{b} - \frac {\left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a),x)

[Out]

B*x/b - (-A*b + B*a)*log(a + b*x)/b**2

________________________________________________________________________________________

Giac [A]
time = 4.55, size = 27, normalized size = 1.08 \begin {gather*} \frac {B x}{b} - \frac {{\left (B a - A b\right )} \log \left ({\left | b x + a \right |}\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(b*x+a),x, algorithm="giac")

[Out]

B*x/b - (B*a - A*b)*log(abs(b*x + a))/b^2

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 25, normalized size = 1.00 \begin {gather*} \frac {B\,x}{b}+\frac {\ln \left (a+b\,x\right )\,\left (A\,b-B\,a\right )}{b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(a + b*x),x)

[Out]

(B*x)/b + (log(a + b*x)*(A*b - B*a))/b^2

________________________________________________________________________________________